package com.woniu.commentorder.service.serviceImp;

import com.hc.entity.Comment;
import com.hc.entity.Paper;
import com.woniu.commentorder.mapper.CommentMapper;
import com.woniu.commentorder.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImp implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Override
    public void inform(int id){
        commentMapper.inform(id);
    }
    @Override
    public List getComByPid(Paper paper){
       return commentMapper.seleByPid(paper);
    }
    @Override
    public void addComment(Comment comment){
        commentMapper.addComment(comment);
    };
}
